// 类被实体化了
class Animal {
    constructor(type, name, age, sex) {
        this.type = type;
        this.name = name;
        this.age = age;
        this.sex = sex;
        this.say = function() {
            
        }
    }
    print() {
        console.log(`【种类】：${this.type}`);
        console.log(`【名字】：${this.name}`);
        console.log(`【年龄】：${this.age}`);
        console.log(`【性别】：${this.sex}`);
    }
}

console.log([Animal]);

console.log(typeof(Animal));

const a = new Animal("狗", "旺财", 3, "男");
console.log(a); // 构建的对象和以前稍微有点区别
a.print();

for (const prop in a) {  // 不会遍历到print
    console.log(prop);
}